// 云函数入口文件
const cloud = require('wx-server-sdk')
cloud.init()
const env = "fz-xiaochengxu-3ggm49cn525bedba";
const db = cloud.database({env});

// 云函数入口函数
exports.main = async (event, context) => {
    db.collection("subscription").add({
        data: {
            encounterId:event.encounterId,
            userId:event.userId,
            isNew:event.isNew
        }
    });
}